function b = subsref(record,index)
% SUBSREF Define field name indexing for SinkToFile objects
switch index.type
    case '()'
        error('Unsupported');
    case '.'
        switch index.subs
            case 'time'
                b = record.time;
            case 'mean'
                b = record.mean;
            case 'var'
                b = record.var;
            case 'repeat'
                b = record.repeat;
            case 'VariableName'
                b = record.VariableName;
            case 'VariableUnit'
                b = record.VariableUnit;
            otherwise
                error('Undefined field');
        end
end